<#include "/custom.include">
package ${basepackage}.controller;

import ${basepackage}.entity.Page;
import ${basepackage}.entity.${className};
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("${classNameFirstLower}")
public class ${className}Controller extends BaseController<${className}>{

	@RequestMapping("findById")
	@ResponseBody
	public ${className} findByPrimaryKey(Object id) {
		return super.findByPrimaryKey(id);
	}

	@RequestMapping("findByPage")
	@ResponseBody
	public Map<String, Object> findByPage(Page<${className}> page, ${className} entity){
		return super.findByPage(page,entity);
	}

	@RequestMapping("save")
	@ResponseBody
	public Map<String,Object> save(${className} entity) {
		return super.save(entity);
	}

	@RequestMapping("update")
	@ResponseBody
	public Map<String,Object> update(${className} entity) {
		return super.update(entity);
	}

	@RequestMapping("delete")
	@ResponseBody
	public Map<String,Object> delete(Object id) {
		return super.delete(id);
	}

	@RequestMapping("bulkDelete")
	@ResponseBody
	public Map<String,Object> bulkDelete(@RequestParam("ids[]") Object[] ids) {
		return super.bulkDelete(ids);
	}
}

